package knapsackProblem;

import org.joda.time.Instant;


public class TimeInstant extends almm.TimeInstant {
	
	public TimeInstant(Instant time) {super.timeInstant = time;}

	@Override
	protected TimeInstant next(almm.ControlDecision u, almm.ProperState x) throws Exception {
		almm.GeneralizedState s =  GeneralizedStateSet.getGeneralizedState(x, this);		
		
		return new TimeInstant(this.timeInstant.plus(((Task)u.getDecision(s)).getDuration()));
	}
}
